package com.yby.mall.coupon.service.impl;

import com.yby.common.dto.SkuLadderDto;
import com.yby.common.utils.R;
import com.yby.mall.coupon.dao.SkuLadderDao;
import com.yby.mall.coupon.entity.SkuLadderEntity;
import com.yby.mall.coupon.service.SkuLadderService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SkuLadderServiceImpl implements SkuLadderService {
    @Autowired
    private SkuLadderDao skuLadderDao;

    @Override
    public R save(SkuLadderDto skuLadderDto) {
        SkuLadderEntity skuLadderEntity = new SkuLadderEntity();
        BeanUtils.copyProperties(skuLadderDto,skuLadderEntity);
        skuLadderDao.insert(skuLadderEntity);
        return R.ok();
    }
}
